﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DepartmentOnline.Plugins;

namespace DepartmentOnline
{
    public partial class Mail : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void SendMessage(object sender, EventArgs e)
        {
            // var esender = new EmailSender();
            // var sendresult = esender.SendMail(FromTB.Text, DestDD.SelectedValue, PassTB.Text, Topic.Text, MessageTB.Text, null);
            //System.Diagnostics.Trace.WriteLine(sendresult + " письмо");
            StatusLb.Text = new EmailSender().SendMail(FromTB.Text, DestDD.SelectedValue, PassTB.Text, Topic.Text, MessageTB.Text, null) ? 
                "Письмо успешно отправлено!" : "Ошибка при отправлении";
        }
    }
}